﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GDoc.Data;

namespace GDoc.Data.Sql
{
    public class UnitOfWork : IUnitOfWork
    {
        public StorageContext Context { get; private set; }

        public UnitOfWork()
        {
            // creates the context
            this.Context = new StorageContext();
        }

        #region IDisposable
        public void Dispose()
        {
            if (this.Context != null)
            {
                this.Context.Dispose();
                this.Context = null;
            }
        }
        #endregion IDisposable
    }
}
